# Contributor: tcely <sequoia-sqv+aports@tcely.33mail.com>
# Maintainer: Simon Rupf <simon@rupf.net>
pkgname=sequoia-sqv
pkgver=1.2.1
pkgrel=0
pkgdesc="simple signature verification program"
url="https://sequoia-pgp.org/"
# loongarch64: blocked by libc crate
arch="all !loongarch64"
license="GPL-2.0-or-later"
makedepends="
	cargo
	cargo-auditable
	clang-dev
	nettle-dev
	"
source="
	https://gitlab.com/sequoia-pgp/sequoia-sqv/-/archive/v$pkgver/sequoia-sqv-v$pkgver.tar.gz
	"
builddir="$srcdir/sequoia-sqv-v$pkgver"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/sqv -t "$pkgdir"/usr/bin
}

sha512sums="
015a4ad6de6dd56321d7d1d8ac652e75c0c16b55693004e4952fd1e935284d2388b1e42e22140da348e776b5caa58c5add5972f43d594ec12a3bf3bca1440405  sequoia-sqv-v1.2.1.tar.gz
"
